Repository navigation
components-settings: Settings and Help, web-icons, foundation v0.4.0 (v0.2.0) - #4
Merged
Merged
Conversation
- marathon 0.22.0 -> 0.23.0; .claude/marathon.toml takes the new [remote] checks
key ("gh pr checks --watch"), and merge drops its own checks wait.
- jdx/mise-action v5.2.10 -> v5.3.0 in ci.yml and release.yml, keeping the
repository's tag pin form.
- The web-foundation v0.3.0 hold stays; the next slice ends it.
The foundation peer range is ^0.4.0 and the development install takes it at its v0.4.0 tag. The v0.3.0 hold is gone, and with it mise.toml's [env] HOLDS, which currency.sh reads as empty when unset. The components read v0.4.0's role hooks, --color-accent and --color-primary, in place of --accent-color and --interaction-color, each keeping its hue fallback; the tests and docs/layout.md follow. No other v0.4.0 breaking change (theme menu, keys help, setOpen/isOpen, Listed's run) reaches the components.
…pies Each component adopts web-foundation v0.4.0's opt-in sheets it uses, after reset and elements and before its own: utilities.css in every component but the status badge; dialog.css in the drawer (its header row); motion.css in the drawer (the slide), the upload dropzone (the drag-over change), the chat thread (the streaming dot's pulse) and the stage timeline (the active marker's ring). glyph-button.css is adopted by none yet: sl-drawer's glyph Close is slice 5. The local copies go: visually hidden names, bare lists, nowrap and tabular values, unbroken ids, the truncated values, scrolling frames, the alternatives slots, head rows, quiet type and the status line take the utilities' classes; the pulse and ring keyframes, the 120ms and 200ms durations take motion.css; the composer's disabled-field rule goes to the elements layer's. Decisions: - The pulse dot and the ring were ::before and ::after; .motion-pulse and .motion-ring need an element, so each is now an aria-hidden span. The ring stays drawn only under no-preference, as before. - Spacing the components set themselves stays local: a list's margin: 0 (the utilities' .list-bare keeps the flow step), the drawer header's padding, border and margin-block-end: 0 over .dialog-header's --space-m, and the event log's dd max-inline-size: 100%, which .text-truncate needs in a flex column. - Where the foundation intentionally differs, its rule is taken: the search match's head row gains the --space-3xs row gap; the search status gains the status line's 1lh minimum; the drawer header's Close no longer shrinks; the artifact viewer's region aligns its content to the start. - The composer's growth cap and the dropzone's strut and row gap read --control-edge, --control-block-size and --focus-reach, the values they restated, the 2px literal among them. - Left local, since no class can reach marked's output: the chat thread's inline code (inline-block, capped) and its tables' and pres' scroll. - Field sizing stays local (composer 12ch, page field 3ch content-box); the foundation's .field-grow is in structure.css, outside this slice's sheets. - Tests: the adoption case names each component's sheets in order; a new case runs the pulse and ring by name inside the shadow roots and the drag-over in --duration-s, none under reduce; the drawer case follows --duration-m; the event log's cases select dd.text-truncate; LINES counts text-node lines, so the dot's own box isn't a line. Before/after specimen captures (--all) differ only by animation phase and the native video spinner.
src/json.ts and its browser test go: the artifact viewer and the chat thread format JSON with @standards-lab/web-foundation/format.js's tryFormatJson, which the foundation tests. The viewer's local pretty() and Json type were tryFormatJson and FormattedJson already, the parse check and RangeError fallback included, so the viewer takes them as they are; the chat thread shows tryFormatJson's text when it parses and the raw text otherwise, as before. Behavior is unchanged. The components' own JSON cases and support/deep.ts stay, now checking the foundation's formatter through the views. README and docs/components.md drop the json module; docs/testing.md drops the notes on cases that lived only in json.test.ts. The pack test lists dist/ as built, so it needed no change.
sl-drawer's Close is a glyph button showing web-icons' octicon x-16, imported as its string module and rendered with lit's unsafeHTML, as spike-html-hosting-components (9fa5850) does. Its name, the close slot's text and the label, stays visually hidden and shows as a popover="hint" named by interestfor, on hover and keyboard focus; aria-description="" keeps the hint's text from also becoming the description. The drawer adopts the foundation's glyph-button.css after utilities, in the foundation's layer order (foundation.glyph before dialog and motion). @standards-lab/web-icons is a second peer at ^0.1.0, installed for development at github:standards-lab/web-icons#v0.1.0. The release rules check both peers alike; the test lists the two peers itself. The browser pages that load the drawer (components.html, profiles.html, the drawer demo) map the x-16 specifier onto the icons' dist/ module, and the server serves the icons under /deps/. The currency script already walks every github: devDependency and its peer range; its task text names the icons. The layer tree names webappgen directly: a Go CLI has no package name, so the layer-above case is a relative import into the sibling ../webappgen checkout, written beside the tree in the scratch workspace, drawing the layer table. web-icons joins the layers below: its package imports are allowed, and a relative path into its install is flagged as the foundation's is.
A reflected boolean `modal` makes sl-drawer the modal dialog at every width, ignoring `dock`; it replaces the `dock="10000rem"` stand-in. - The mode is `modal || matches(width < dock)`, so an unreadable dock with `modal` is still a drawer, and without `modal` nothing changes. - Changing `modal` while connected runs the dock-crossing switch: an open drawer closes silently, with no close event. When the mode stays `drawer` (modal toggled below dock) the dialog is still in the tree, so it is closed with dialog.close() after the element stops tracking it as modal, which the existing close guard ignores. - Browser tests: modal at a wide and a narrow viewport, dock ignored (below the viewport, unreadable, resize across), reflection, and a silent close for each direction with and without a mode change.
…ext table Port spike-html-hosting-components (9fa5850) src/shortcuts.ts and .css onto web-foundation v0.4.0: rows are exactly bindings(dialog) for the dialog that holds the element (bindings(null) outside one), read again as it connects, as its dialog opens (beforetoggle), and on document change and storage events; a row the reader's setting turns off carries "off" and the class off; the screen-reader note follows the table. Nothing takes focus, no key is bound, no [data-keys-list] is rendered. Decisions: - web-foundation v0.4.0 ships no keys-help module or note, so the element keeps the spike's note text as its exported NOTE; the spike's unit test holding it to the foundation's note has nothing to compare against and is not ported. - The note takes the utilities' text-quiet-s; the element adopts reset, elements, utilities, then its own sheet. - The profiles case: the element holds only body and code text, which the type facet leaves alone, so it asserts sans and mono give the same font for sl-shortcuts instead of a different one; its color and padding are read from th. - Fixture test/fixtures/shortcuts.html registers J itself in place of the spike's sl-section-tree, which this repository doesn't have. - The spike's width/intrinsic-size and keys-help-request cases are not ported: the brief's tests don't list them, and the foundation has no keys-help module to request.
…tings, applied at once Port spike-html-hosting-components (9fa5850) src/settings.ts and .css onto web-foundation v0.4.0: the color, scheme, space, and type rows, each a ◀ value ▶ radio group (H/L and the arrows' clicks step, wrapping; J/K and up/down move between rows, stopping at the ends; left/right cycle natively; these keys stay inside the rows), beside an inert preview card; the character-key switch and the wait. Every change applies to the root and stores at once through preferences apply/save and keys changeSettings, with no Save and no Cancel, and fires a bubbling, composed change at the host. It reads both settings again on connect, dialog open (toggle), document change, and storage. Decisions: - The theme layout is web-foundation 309e6b9 (v0.3.0's source) src/theme-menu.css's rules, moved unlayered into src/settings.css beside the spike's own rules; the .theme-menu dialog, its h2, and its footer rules are dropped, since the element holds no dialog. Class names keep the theme-menu- prefix the spike and its tests use. The earlier sources' provenance lines are kept. - The element adopts reset, elements, meta (.button-blue), structure (.field), utilities (.table-striped), then its own sheet; the adoption case in components.test.ts learns meta and structure. - preferences read() is used by the tests to read the stored choice back; the element reads what applies from the root, as the spike does, so a stored name this page didn't register shows as the default. - The dialog-open re-read listens on toggle, not beforetoggle as sl-shortcuts does, since it also moves focus to the first row's checked radio after the dialog opens. - Profiles case: color and padding read from .theme-menu-preview, the font from its button (--font-ui, which the type facet changes). - Tests: added the host's change events, the arrow keys, re-read on open and on document change, the preview taking no focus, and no animation; the fixture registers J and K itself in place of sl-section-tree. Not ported: the theme-menu request case (v0.4.0 has no theme menu), and the odd-wait option, which a stored wait can't reach since keys settings() drops a wait not in WAITS.
…the specimen captures The demo index, now a reading page on the foundation's layout sheet, and the new settings and shortcuts specimen pages carry the pattern: Help (?) and Settings (S) glyph buttons in the header's .header-actions, bound by data-keys through the foundation's keys module, opening dialog#help (.dialog-fit, sl-shortcuts) and dialog#settings (.dialog-wide, sl-settings), each headed by a .dialog-header whose Close shows Esc. The README's "Settings and Help" gives the markup. demo/glyphs.js fills web-icons markers from the import-mapped modules, as iconFill() does at build. The drawer page adds a modal Outline drawer. Decisions: - The index keeps the lean entry, page.css with register.js, so its Settings lists the default units; the specimen pages use the full entry. - keys.js clicks an opener without focusing it, so the test focuses the opener before pressing its key: Escape returns focus to the element that held it. - The shortcuts page joins the stage timeline among the pages the focus ring cases skip, with a case pinning that sl-shortcuts renders nothing focusable. - The themes case reads a radio's or checkbox's value as no shown text, as sl-settings' rows render none. - The captures stay uncommitted, as before: mise run screenshots writes them where --dir says.
package.json's version is 0.2.0, and CHANGELOG.md gains its [0.2.0] section, dated 2026-11-22, breaking entries first: Removed (json.js) before Changed (peers, color tokens, the foundation's sheets and motion spans, sl-drawer's glyph Close), then the tooling bump, then Added (sl-settings, sl-shortcuts, sl-drawer's modal, the Settings and Help pattern). The link reference sits with [0.1.0]'s at the end. The README installs v0.2.0 with web-foundation v0.4.0 and web-icons v0.1.0, states both peer ranges, counts fourteen elements and no JSON formatter, and names the icons in the install and currency task lines. docs/development.md and docs/testing.md name the icons beside the foundation as a peer, a github: devDependency, and an install dist/ imports by name. The Provenance line's web-foundation v0.3.0 stays as the seed's history.
Drop the doc comments on unexported identifiers (drawer's CLOSE, the dialog test's shown, glyph-button's Described), the demo sheet's comment on an element selector, and settings.css's sentence excusing its literal lengths; rewrap the drawer's and the artifact viewer's broken doc comment lines.
…er and the motion spans Preflight looks for web-icons beside the foundation, as the build reads both, and docs/development.md says so; the stage timeline's ring span is hidden from assistive technology, as the chat thread's dot is.
…d constants The profiles case holds sl-shortcuts' note to the page's body font under each type, in place of asserting sans and mono agree; the note case checks its text against the claim, not the exported NOTE; and a shrink-to-fit case covers the note's containment, failing without it.
The Tab states (drawer-modal-close, shortcuts-dialog) now wait, after Tab, until the focused control's interestfor hint matches :popover-open and its animations finish, rather than a fixed delay; the tab step becomes tabToHint. Their captions and the module header name the shown hint.
The theme section's body was two columns by a viewport media query (width >= 48rem), inherited from the theme-menu dialog; in a narrow box in a wide viewport the preview card overlapped the rows and overflowed the host. Decisions: - An intrinsic wrap, no query: .theme-menu-body is a wrapping flex row, the rows flex 2 1 0 and the preview flex 3 1 0, each held at its min-content by the automatic minimum (the preview's min-inline-size: 0 dropped). The preview goes below the rows when both don't fit at their narrowest, and beside them, sharing the width two to three, when they do. A container query would need container-type on an inner element, which zeroes that element's intrinsic width and breaks shrink-to-fit parents; the wrap keeps the element's max-content width its content's. - Browser cases in a 1280px viewport: at 20rem the preview is below the rows, at 60rem beside them, and in a max-content parent the element is as wide as its content; in each, the rows and the preview don't intersect and nothing is outside or overflows the host. The 20rem case failed on the old sheet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.client.stack · task 9/12 · components-settings
Summary
^0.4.0and a new peer, web-icons^0.1.0.sl-settings(theme and keys, applied and stored at once) andsl-shortcuts(plain-textHelp from
bindings(dialog)).modalattribute.
of their own rules.
json.jsis gone, and the components read--color-accentand--color-primary.copies.
checkssplit frommerge)and mise-action v5.3.0.
Core changes
sl-settings, from spike-html-hosting-components v0.5.1, has rows for color, scheme,space, and type, plus the character-key switch and the wait between presses. It has no Save and
no Cancel. Why: web-foundation v0.4.0 removed its theme menu and points pages here. Its layout
is v0.3.0's theme-menu rules, moved into the component's own sheet.
sl-shortcutsrenders a Keys | Action table that reads "off" where the reader's settingsturn a binding off. Nothing in the table takes focus, and the component binds no keys. Why:
Help is now a component, and the app binds the keys.
modal: the drawer is a modal dialog at every width, ignoringdock. Toggling itwhile open closes the drawer silently. Why: it replaces go-wasm's
dock="10000rem"stand-in.^0.4.0and web-icons^0.1.0, so the app'siconFill()andthe components resolve one copy. The currency check, the release test, preflight, and the docs
now cover both.
json.jsremoved, the renamedhooks, the adopted sheets, the Close shown as a glyph, and the streaming dot and ring now spans.
Verify
mise run check: ✓ lint, types, build, 92 unit and 469 browser tests ·mise run currency: exit0, nothing held
mise run demoin web-components, then open/demo/settings.html. Press S to open Settings.Press L to step the color from zen to github, and the page re-themes at once. J/K move between
rows. Esc closes the dialog. In "States at 20rem", the preview sits below the rows, clear of
them, and it moves beside them once the element is about 34rem wide.
On
/demo/shortcuts.html, press ? to open Help. The table lists? Help,S Settings,/ Filter, andG then T Back to the top. Uncheck the character keys in Settings, and Helpnow marks each of them "off".
On
/demo/drawer.htmlat full width, the Outline drawer opens as a modal while the other drawerstays docked. Tab to Close, and its "Close Outline" hint appears.
Design review captures, for zen in light and dark plus one contact sheet per visual across all
six profiles:
scratchpad/curated/19-settings-dialog--zen-regular-mono-{light,dark}.png, the390px variant
20-…, the 20rem box18-settings-20rem--zen-regular-mono-dark.png, andsettings-dialog-contact-sheet.png22-shortcuts-dialog--zen-regular-mono-{light,dark}.pngandshortcuts-dialog-contact-sheet.png16-drawer-modal-…,17-drawer-modal-close-…, andtheir contact sheets
(scratchpad = /tmp/claude-1000/-home-jaime-architecture-webappgen/dc32f843-0c25-48fb-9a24-039ef1063f9c/scratchpad;
all 166 captures are in
captures/there.)Decided without you
The streaming dot and the timeline's ring became
aria-hiddenspans, because the foundation'smotion classes need a real element.
The composer's and pagination's field sizing and the components' own transitions stay local.
The four sheets have no rule for them, and the transitions read
--duration-*.Taking the foundation's rules shifted four small details: a search-match row gap, the status
line's minimum height, a drawer Close that doesn't shrink, and the viewer region aligned to the
start. Pixel diffs otherwise differ only in animation timing.
sl-shortcutsexports its own screen-readerNOTE, because v0.4.0 has none. It is a candidatefor the foundation later.
The layer-tree test names webappgen by a relative path into the sibling checkout
(
../webappgen/…), because webappgen has no npm name. The standards review noted that thisnames a dependent, but behavior 10 asks for it.
web-icons is mapped in the demo and test pages one icon at a time, since a prefix mapping can't
add
.js. The demo fills<svg data-icon>markers the wayiconFill()does.The demo index stays on the lean entry, so its Settings lists only zen. The settings and
shortcuts pages use the full entry.
A key opens a dialog without focusing its opener, so after pressing S, Esc returns focus to
whatever held it before. The README says focus "returns to the element that held it".
The CHANGELOG lists the glyph Close as breaking, because the
closeslot's text is now thebutton's name and hint rather than its visible content.
The capture states wait until the hint popover is open, with no time limit (the pinned Chrome
supports
interestfor).The editor dropped these decisions, now expressed in code and docs:
The template-resume decision now points at the README's "Settings and Help" section.
Redirects and escalations
rows, because a viewport query (48rem) set its two columns. Fixed: the theme section now wraps
by the element's own width, with no query, which keeps shrink-to-fit parents working. Three
browser tests cover 20rem, 60rem, and a max-content parent; the 20rem test fails on the old
sheet.
Merge danger: one-way door: tag
v0.2.0(web-components), authorized on accept · blastradius: web-components; consumers move only when they take the tag · web-components: merge waits
on CI (
gh pr checks --watch)Needs you: design review of the captures (sl-settings, sl-shortcuts, the drawer's Close and
modal)